import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: Home
  },
  {
    path: '/brief',
    name: 'brief',
    meta: {
      title: '企业简介'
    },
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/brief/index.vue')
  },
  {
    path: '/news',
    name: 'news',
    meta: {
      title: '公交新闻'
    },

    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/news/index.vue'),
    children: [{

      name: "busNewsDitle",
      path: "/busNewsDitle",
      meta: {
        footShow: true
      },
      component: () => import( /* webpackChunkName: "inTheaters" */ '@/views/news/components/busNewsDitle'),
    },],
  },
  {
    path: '/guide',
    name: 'guide',
    meta: {
      title: '乘车指南'
    },
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/guide/index.vue')
  },
  {
    path: '/party',
    name: 'party',
    meta: {
      title: '企业党建'
    },
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/party/index.vue')
  },
  {
    path: '/window',
    name: 'window',
    meta: {
      title: '工会之窗户'
    },
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/window/index.vue')
  },
  {
    path: '/complaint',
    name: 'complaint',
    meta: {
      title: '在线投诉'
    },
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/complaint/index.vue')
  },
  {
    path: '/paths',
    name: 'paths',
    meta: {
      title: '路线查询'
    },
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/paths/index.vue')
  },

]

const router = new VueRouter({
  mode: 'hash',
  routes
})

export default router
